﻿namespace LS.Nc6.Application.System
{
    /// <summary>
    /// 提供文件存储表服务
    /// </summary>
    [Serializable]
    public class SysFileService : BaseService<SysFileEntity>, ISysFileService, ITransient
    {
        
        public async Task<List<Hashtable>> CustomerFileList(string fileids)
        {
            List<Hashtable> list = new List<Hashtable>();
            if (string.IsNullOrEmpty(fileids)) return list;
            var modellist2 =await DbContext.Instance.Queryable<SysFileEntity>().In(fileids.GetStringToLongArryNoNull()).ToListAsync();
            for (int j = 0; j < modellist2.Count; j++)
            {
                Hashtable hs = new Hashtable();
                hs.Add("num", j + 1);
                hs.Add("fname", modellist2[j].Foname);
                hs.Add("ftype", modellist2[j].Ftype);
                hs.Add("fpath", modellist2[j].Fpath);
                hs.Add("id", modellist2[j].Id);
                list.Add(hs);
            }
            return list;
        }
    }
}
